<script setup>
  import zhCn from 'nstd-components-pc-v3/locale/lang/zh-cn';
  import HomeHeaderTabs from '@/views/home/components/HomeHeaderTabs.vue';
  import { menu } from '../public/menu';
  import yuanxing from './components/yuanxing.vue';
  import pcIndex from './views/home/pcIndex.vue';
  import monitorIndex from './views/home/monitorIndex.vue';
  const locale = ref(zhCn);
  const theme = ref('blue');
  const appType = ref('');
  // onBeforeMount(()=>{
  //   if(window.NC_PROJECT_CONFIG.theme){
  //     theme.value = window.NC_PROJECT_CONFIG.theme
  //   }
  //   appType.value = window.NC_PROJECT_CONFIG.appType
  // });
</script>

<template>
  <NstdConfigProvider :locale="locale">
    <ThemeProvider :theme="theme">
      <template v-if="!menu.length">
        <template v-if="!['pc', 'monitor'].includes(appType)">
          <HomeHeaderTabs />
          <router-view />
        </template>
        <pcIndex v-else-if="appType === 'pc'" />
        <monitorIndex v-else />
      </template>
      <yuanxing v-else />
    </ThemeProvider>
  </NstdConfigProvider>
</template>
<style>
  ::-webkit-scrollbar {
    width: 6px;
  }

  ::-webkit-scrollbar:horizontal {
    height: 6px;
  }

  ::-webkit-scrollbar-track {
    border-radius: 10px;
  }

  ::-webkit-scrollbar-thumb {
    background-color: #0003;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
  }

  ::-webkit-scrollbar-thumb:hover {
    cursor: pointer;
    background-color: #0000004d;
  }
</style>
